<%@ page language="java" import="java.util.*,java.sql.*" pageEncoding="gb2312"%>
<jsp:directive.page import="com.sql.ReportFormSql"/>
<jsp:directive.page import="com.database.DataBase"/>

<%
         String sign=request.getParameter("sign");
         String branchID="";
         String WinTypeID=request.getParameter("WinTypeID");
         String WinTypeCallID=new String(request.getParameter("WinTypeCallID").toString());
         String WinTypeCallID1=request.getParameter("WinTypeCallID1");
         String WinTypeName=new String(request.getParameter("WinTypeName").toString().getBytes("ISO8859_1"));                                 
         String sql="";
         String sql1="";
         ReportFormSql report=new ReportFormSql();
         DataBase base=new DataBase();
         if(sign.equals("1")){ 
             sql=report.insertWintypeall(WinTypeID,WinTypeCallID,WinTypeCallID1,WinTypeName);
             //sql1=report.insertWintypeallOpentime(WinTypeID,branchID,ConfigID,WinTypeStartTime,WinTypeEndTime,WinTypeStartTime1,WinTypeEndTime1,MaxTicketNumAM,MaxTicketNumAF,StartTicketNum,EndTicketNum,SequenceID);
           
         }else if(sign.equals("2")){
             String oid=request.getParameter("oid");
             sql=report.updateWintypeall(WinTypeID,WinTypeCallID,WinTypeCallID1,WinTypeName,oid);
            // sql1=report.updateWintypeallOpentime(WinTypeID,ConfigID,WinTypeStartTime,WinTypeEndTime,WinTypeStartTime1,WinTypeEndTime1,MaxTicketNumAM,MaxTicketNumAF,StartTicketNum,EndTicketNum,SequenceID,oid);
         }
          System.out.println("SQL:"+sql);
          //System.out.println("SQL:"+sql1);
          base.executeUpdate(sql);
          //base.executeUpdate(sql1);
          base.closeStmt();
          base.closeConn();
          response.sendRedirect("wintypeall.jsp");
%>